home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-13 / amac44d.zip / VDAT10.QM < prev    next >
Text File  |  1992-05-27  |  41KB  |  713 lines

  1. *                             VDAT10.QM v1.0a
  2. *         Macros To Scroll and View Row and Column Descriptions
  3. *         of Data In "Deep and Wide" Tables Scrolled Off Screen
  4. *       ═════════════════════════════════════════════════════════
  5. *                                 5/30/92
  6. *
  7. *                                                               (Bytes)
  8. *     Scroll and View Row and Column Descriptions Scrolled Off Screen
  9. *      ├──  ^CursorLeft   ──-  Scroll Left  of  Cursor   ( )      139
  10. *      ├──  ^CursorRight  ──-  Scroll Right of  Cursor            143
  11. *      ├──  ^CursorUp     ──-  Scroll Up   From Cursor            151
  12. *      └──  ^CursorDown   ──-  Scroll Down From Cursor            151
  13. *
  14. * f4  View Snapshot of Row and Column Descriptions (No scroll)    119
  15. * @3  Close Window 2 and Quit Nul After Invoking Ctrl_Cursor Macros
  16. *
  17. * f7  Jump to Previous Position Marker in Current File
  18. * f8  Jump to Next Position Marker in Current File
  19. * @h  Jump To Selected Index Item In File From Index
  20. * @1  Right Justify Column Block of Data
  21. *
  22. *     Description of Macros
  23. *     How To Use These Macros
  24. *     Notes
  25. *     Data Table For Testing
  26. *     Examples and Sample Output
  27. *     Changing Macros For Different Data Tables
  28. *
  29. *--eoi
  30.  
  31.  
  32. * (DESCRIPTION)
  33. * ──────────────
  34. * These macros show in a window the row and column descriptions of data
  35. * in "wide and deep" data tables whose row and column descriptions may
  36. * have scrolled from the screen.  The macros may be invoked continually
  37. * to view the row and column descriptions while scrolling through data.
  38.  
  39.  
  40. * (HOW) TO USE THESE MACROS
  41. * ──────────────────────────
  42. *     1)  Macros ^CursorRight, ^CursorLeft, ^CursorDown,  or ^CursorUp:
  43. *         a) These macros are invoked with the cursor on data in a
  44. *            table whose row and column descriptions may have scrolled
  45. *            from the screen.  The row and column descriptions of data
  46. *            at the cursor is viewed in window 2.  Continually invoking
  47. *            these macros moves the cursor to the next data in the
  48. *            respective direction (i.e.  ^CursorLeft macro moves the
  49. *            cursor to the next data left of the cursor), with the
  50. *            data's description scrolling at the same time.  The cursor
  51. *            remains in window 1 so data can be edited or viewed while
  52. *            scrolling.  Data at the cursor when the macro was invoked
  53. *            is continually highlighted in window 2 for visibility.
  54. *         b) Use @3 to quickly remove the second viewing window and
  55. *            quit the Nul file.
  56.  
  57. *     2)  For macros f4/f7/f8/@1/@3/@h, see macro descriptions below.
  58.  
  59.  
  60. * (NOTES)
  61. * ────────
  62. *   1 - Data and descriptions must be a paragraph - no empty lines.
  63. *   2 - Row descriptions and only row descriptions (no data) must be in
  64. *       columns 1-10.  For wider or narrower row description columns,
  65. *       see "Changing Macros" below.
  66. *   3 - Column descriptions must be two lines.  For column descriptions
  67. *       with more or less lines, see "Changing Macros" below.
  68. *   4 - QEdit v2.15 is required.
  69. *   5 - Data entries can be empty except in the last data column
  70. *       (furthest right), and there must be at least one data entry in
  71. *       each row.
  72. *   6 - All data entries should be right justified.  Macro @1 from
  73. *       Amac43.zip rfr004.qm to right justify column blocks of data is
  74. *       included.
  75. *   7 - Column description entries may be multiple words, and may
  76. *       extend right no more than one character past right justified
  77. *       data or left to within no more than one character of the
  78. *       previous right justified data column.
  79. *   8 - If any data column 1 data is viewed, these macros remove from
  80. *       viewing the last character of the row's description.  This
  81. *       condition can be corrected, if desired, by removing the
  82. *       [cursorleft], as noted.  Doing this, however, limits data and
  83. *       column descriptions to be separated by at least 2 spaces, not 1
  84. *       when the [cursorleft] is included.
  85. *   9 - If Qconfig is set to insert blocks above the line, the
  86. *       following line/commands can be removed, as noted:
  87. *                     "isemptyline jfalse 3 delline"
  88. *  10 - If Qconfig is set to close windows on [quit], the following
  89. *       line/commands can be removed from f4, as noted:
  90. *                      "prevwindow onewindow"
  91.  
  92. * 
  93. * (DATA) TABLE FOR TESTING (See Notes above for use)
  94. * ────────────────────────────────────────────────────────────────────
  95. *     A larger sample data table containing 10 columns and 50 lines is
  96. * included as vdat.tst in amacxx.zip.  Following is a portion of this
  97. * table for testing.  Please note that, unless the macros are modified,
  98. * the data table top and bottom lines MUST be blank, the row
  99. * descriptions MUST be in columns 1-10, and column descriptions must be
  100. * two lines.
  101.  
  102. *             Column    Column    Column    Column    Column    Column
  103. *                 01        02        03        04        05        06
  104. *  Row  01     01.01     01.02     01.03     01.04     01.05     01.06
  105. *  Row  02     02.01     02.02     02.03     02.04     02.05     02.06
  106. *  Row  03     03.01     03.02     03.03     03.04     03.05     03.06
  107. *  Row  04     04.01     04.02     04.03     04.04     04.05     04.06
  108. *  Row  05     05.01     05.02     05.03     05.04     05.05     05.06
  109. *  Row  06     06.01     06.02     06.03     06.04     06.05     06.06
  110. *  Row  07     07.01     07.02     07.03     07.04     07.05     07.06
  111. *  Row  08     08.01     08.02     08.03     08.04     08.05     08.06
  112. *  Row  09     09.01     09.02     09.03     09.04     09.05     09.06
  113. *  Row  10     10.01     10.02     10.03     10.04     10.05     10.06
  114.  
  115.  
  116. * (EXAMPLES) AND SAMPLE OUTPUT
  117. * ─────────────────────────────
  118. * Following are examples with the rows and column descriptions scrolled
  119. * off the screen and invoking the macros in this Data Table:
  120.  
  121. *          Data Columns
  122. *           01..+...10
  123. *                   
  124.  
  125. *   1)  With cursor on "05.05" or space before, ^CursorRight gives . . .
  126. *
  127. *                         Column
  128. *                             06
  129. *           *──Row──05─────05.06
  130. *           *  Row  06     06.06
  131. *           *  Row  07     07.06
  132. *           *  Row  08     08.06
  133. *           *  Row  09     09.06
  134. *           *  Row  10     10.06
  135.  
  136. *   2)  With cursor on "09.02" or space before, ^CursorDown gives . . .
  137. *
  138. *                         Column    Column    Column    Column    Column
  139. *                             02        03        04        05        06
  140. *           *──Row──10─────10.02     10.03     10.04     10.05     10.06
  141.  
  142. *   3)  With cursor on "10.02" on space before, f4 gives  . . .
  143. *
  144. *                         Column    Column    Column    Column    Column
  145. *                             02        03        04        05        06
  146. *           *  Row  10     10.02     10.03     10.04     10.05     10.06
  147.  
  148.  
  149. * (CHANGING) MACROS FOR DIFFERENT DATA TABLES
  150. * ────────────────────────────────────────────
  151. *     Only two changes to each macro are needed to accomadate data
  152. * tables with different row and column descriptions:
  153. *         1)  Column descriptions must be two lines.  For column
  154. *             descriptions with more or less lines, this macro may be
  155. *             modified by changing the number of [CURSORDOWN's] to
  156. *             equal the number of column description lines, as noted.
  157. *         2)  Row descriptions and only row descriptions (no data) must
  158. *             be in columns 1-10.  For wider or narrower row
  159. *             description columns, this macro can be modified by
  160. *             changing the [gotocolumn "10"] to [gotocolumn "nn"] where
  161. *             "nn" is the row description column width, as noted.
  162.  
  163. * (OTHER) MACROS
  164. * ───────────────
  165. * See AMACxx.ZIP for many other QEdit macros.
  166.  
  167.  
  168. *                            M A C R O S
  169. * ----------------------------------------------------------------------
  170. * ^(CursorLeft)  View Row and Column Descriptions of Data
  171. *                Scrolled Off Screen, Scroll Left of Cursor
  172. * ----------------------------------------------------------------------
  173. * See "How To Use Macros" above for use of this macro.
  174.  
  175. ^cursorleft macrobegin
  176.         setscreenoff setinsmode altwordset setsoundoff
  177.         setwordwrapmode togglewordwrap
  178. * ---------------- End Macro If We're On Empty Lines ----------------*
  179.         isemptyline jtrue END               * Can't start on empty line
  180. * -------------- Position Cursor On Data Left of Cursor --------------*
  181.         markword jfalse 0                   * Wordleft if cursor not on data
  182.         wordright wordleft                  * Pos on char 1 of cursor data
  183.      0: wordleft                            * Pos char 1 data left of cursor
  184.         #173                                * Insert pos marker
  185. * ------------------ Paste Data/Descriptions To Nul ------------------*
  186.         endpara unmarkblock markline        * Mark endpara
  187.         prevpara copy                       * Copy data/desc to scrap
  188.         find #173 return delline return     * Find pos marker
  189.         delch                               * Delete it, now posit'nd on data
  190.         onewindow horizontalwindow          * Open 2 windows
  191.         editfile "nul" return               * Load Nul window 2
  192.         endfile markline
  193.         begfile deleteblock                 * Make empty Nul
  194.         paste                               * Paste data/desc to Nul
  195. * -------------- Remove Redundant Data And Descriptions --------------*
  196.         isemptyline jfalse 3 delline        * For Qconfig set to insert
  197.                                             *  blocks above or below line
  198.                                             * (Can remove line if set above)
  199.      3: repeatfind wordleft                 * Move to prev data
  200.         cursorup markword                   * Mark word up one line
  201.         begfile markcolumn                  * Finish marking redund blk
  202.         fillblock " " return                * Delete redundant entries
  203.         gotocolumn "10" return              * Change "10" for diff row
  204.                                             *  desc col widths
  205.         cursorright                         * Move out of row desc's
  206.         unmarkblock markcolumn              * Start blk w/o row desc's
  207.         repeatfind                          * Move to pos marker
  208.         splitline endline                   * Move to end of prev data
  209.         prevposition joinline prevposition  * Include redundant data
  210.         cursorleft                          * Don't include extra spc in blk
  211.                                             * (If removed, data and col
  212.                                             *  desc's must be separated by
  213.                                             *  at least 2 spaces, but viewing
  214.                                             *  data in col 1 is then ok)
  215.      4: pagedown jtrue 4                    * Get all redundant data in blk
  216.         deleteblock                         * Delete it to bof
  217.         begfile                             * Goto bof
  218.         CURSORDOWN                          * Pos on col desc line 2
  219.                                             * (Add/delete cursordown's for
  220.                                             *  more/less col desc lines)
  221.         CURSORDOWN                          * Move to data row 1
  222.      5: markline                            * Mark to test data redundancy
  223. * -------- Quit If Macro Was Not Invoked With Cursor In Data --------*
  224.         isemptyline jfalse 5A               * End if not started in data
  225.         quit                                * Quit Nul
  226.         prevwindow onewindow                * Data window 1, close windows
  227.         jump END                            * End macro
  228. * - Delete Position Marker And Remaining Redundant Data/Descriptions -*
  229.     5A: find return "L" return jtrue 6      * Test if on marker row
  230.         delline jump 5                      * Delete redundant all rows
  231.      6: delch                               * Delete pos marker we're on
  232.         prevwindow                          * Data window
  233.         markword gotoblockend cursorleft    * Pos on data last char
  234. * -------------------- Highlight Data In Window 2 --------------------*
  235.         nextwindow                          * Nul window
  236.         markword                            * Mark data in Nul
  237. * ---- Fill Empty Space Between Row Description and Data With "─" ----*
  238.         begline                             * To begin of title desc
  239.         markcolumn                          * Close block
  240.         findreplace                         * Replace
  241.             " " return                      *   all empty spaces
  242.             #196 return "LN" return         *   with "─", in block
  243.         gotoblockend cursorleft             * Pos on data last char
  244.         markword                            * Re-highlight data in window 2
  245.         prevwindow                          * Data window 1
  246.    END: defaultwordset makectrofscreen      * Re-set, to view more data lines
  247. *
  248. * 139 bytes Mon  05-04-1992  12:07:35 (TH ^cursorleft, to ALL #3/841-845)
  249.  
  250. * 
  251. * ----------------------------------------------------------------------
  252. * ^(CursorRight)  View Row and Column Descriptions of Data
  253. *                 Scrolled Off Screen, Scroll Right of Cursor
  254. * ----------------------------------------------------------------------
  255. * See "How To Use Macros" above for use of this macro.
  256.  
  257. ^cursorright macrobegin
  258.         setscreenoff setinsmode altwordset setsoundoff
  259.         setwordwrapmode togglewordwrap
  260. * ---------------- End Macro If We're On Empty Lines -----------------*
  261.         isemptyline jtrue END               * Can't start on empty line
  262. * -------------- Position Cursor On Data Right of Cursor -------------*
  263.         isendline jtrue 1 wordright         * If at eol, wordleft
  264.         isendline jtrue 1 wordright         * If at eol, wordleft
  265.      1: wordleft                            * Pos char 1 data rt of cursor
  266.         #173                                * Insert pos marker
  267. * ------------------ Paste Data/Descriptions To Nul ------------------*
  268.         endpara unmarkblock markline        * Mark endpara
  269.         prevpara copy                       * Copy data/desc to scrap
  270.         find #173 return delline return     * Find pos marker
  271.         delch                               * Delete it, now posit'nd on data
  272.         onewindow horizontalwindow          * Open 2 windows
  273.         editfile "nul" return               * Load Nul window 2
  274.         endfile markline
  275.         begfile deleteblock                 * Make empty Nul
  276.         paste                               * Paste data/desc to Nul
  277. * -------------- Remove Redundant Data And Descriptions --------------*
  278.         isemptyline jfalse 3 delline        * For Qconfig set to insert
  279.                                             *  blocks above or below line
  280.                                             * (Can remove line if set above)
  281.      3: repeatfind wordleft                 * Move to prev data
  282.         cursorup markword                   * Mark word up one line
  283.         begfile markcolumn                  * Finish marking redund blk
  284.         fillblock " " return                * Delete redundant entries
  285.         gotocolumn "10" return              * Change "10" for diff row
  286.                                             *  desc col widths
  287.         cursorright                         * Move out of row desc's
  288.         unmarkblock markcolumn              * Start blk w/o row desc's
  289.         repeatfind                          * Move to pos marker
  290.         splitline endline                   * Move to end of prev data
  291.         prevposition joinline prevposition  * Include redundant data
  292.         cursorleft                          * Don't include extra spc in blk
  293.                                             * (If removed, data and col
  294.                                             *  desc's must be separated by
  295.                                             *  at least 2 spaces, but viewing
  296.                                             *  data in col 1 is then ok)
  297.      4: pagedown jtrue 4                    * Get all redundant data in blk
  298.         deleteblock                         * Delete it to bof
  299.         begfile                             * Goto bof
  300.         CURSORDOWN                          * Pos on col desc line 2
  301.                                             * (Add/delete cursordown's for
  302.                                             *  more/less col desc lines)
  303.         CURSORDOWN                          * Move to data row 1
  304.      5: markline                            * Mark to test data redundancy
  305. * -------- Quit If Macro Was Not Invoked With Cursor In Data --------*
  306.         isemptyline jfalse 5A               * End if not started in data
  307.         quit                                * Quit Nul
  308.         prevwindow onewindow                * Data window 1, close windows
  309.         jump END                            * End macro
  310. * - Delete Position Marker And Remaining Redundant Data/Descriptions -*
  311.     5A: find return "L" return jtrue 6      * Test if on marker row
  312.         delline jump 5                      * Delete redundant all rows
  313.      6: delch                               * Delete pos marker we're on
  314.         prevwindow                          * Data window
  315.         markword gotoblockend cursorleft    * Pos on data last char
  316. * -------------------- Highlight Data In Window 2 --------------------*
  317.         nextwindow                          * Nul window
  318.         markword                            * Mark data in Nul
  319. * ---- Fill Empty Space Between Row Description and Data With "─" ----*
  320.         begline                             * To begin of title desc
  321.         markcolumn                          * Close block
  322.         findreplace                         * Replace
  323.             " " return                      *   all empty spaces
  324.             #196 return "LN" return         *   with "─", in block
  325.         gotoblockend cursorleft             * Pos on data last char
  326.         markword                            * Re-highlight data in window 2
  327.         prevwindow                          * Data window 1
  328.    END: defaultwordset makectrofscreen      * Re-set, to view more data lines
  329. *
  330. * 143 bytes Mon  05-04-1992  12:07:59 (TH ^cursorright, to ALL #3/841-845)
  331.  
  332. * 
  333. * ----------------------------------------------------------------------
  334. * ^(CursorUp)  View Row and Column Descriptions of Data
  335. *              Scrolled Off Screen, Scroll Up From Cursor
  336. * ----------------------------------------------------------------------
  337. * See "How To Use Macros" above for use of this macro.
  338.  
  339. ^cursorup macrobegin
  340.         setscreenoff setinsmode altwordset setsoundoff
  341.         setwordwrapmode togglewordwrap
  342. * ---------------- End Macro If We're On Empty Lines ----------------*
  343.         cursorUP                            * Move up one line
  344.         isemptyline jtrue END               * Can't have empty data lines
  345. * ------------ Position Cursor On Data Left of Cursor Up ------------*
  346.         markword jfalse 0                   * Wordleft if cursor not on data
  347.         wordright wordleft                  * Pos on char 1 of cursor data
  348.      0: wordleft                            * Pos char 1 data left of cursor
  349. * ----- Position Cursor On Data Right of Data Left of Cursor Up -----*
  350.         isendline jtrue 1 wordright         * If at eol, wordleft
  351.         isendline jtrue 1 wordright         * If at eol, wordleft
  352.      1: wordleft                            * Pos char 1 data rt of cursor
  353.         #173                                * Insert pos marker
  354. * ------------------ Paste Data/Descriptions To Nul ------------------*
  355.         endpara unmarkblock markline        * Mark endpara
  356.         prevpara copy                       * Copy data/desc to scrap
  357.         find #173 return delline return     * Find pos marker
  358.         delch                               * Delete it, now posit'nd on data
  359.         onewindow horizontalwindow          * Open 2 windows
  360.         editfile "nul" return               * Load Nul window 2
  361.         endfile markline
  362.         begfile deleteblock                 * Make empty Nul
  363.         paste                               * Paste data/desc to Nul
  364. * -------------- Remove Redundant Data And Descriptions --------------*
  365.         isemptyline jfalse 3 delline        * For Qconfig set to insert
  366.                                             *  blocks above or below line
  367.                                             * (Can remove line if set above)
  368.      3: repeatfind wordleft                 * Move to prev data
  369.         cursorup markword                   * Mark word up one line
  370.         begfile markcolumn                  * Finish marking redund blk
  371.         fillblock " " return                * Delete redundant entries
  372.         gotocolumn "10" return              * Change "10" for diff row
  373.                                             *  desc col widths
  374.         cursorright                         * Move out of row desc's
  375.         unmarkblock markcolumn              * Start blk w/o row desc's
  376.         repeatfind                          * Move to pos marker
  377.         splitline endline                   * Move to end of prev data
  378.         prevposition joinline prevposition  * Include redundant data
  379.         cursorleft                          * Don't include extra spc in blk
  380.                                             * (If removed, data and col
  381.                                             *  desc's must be separated by
  382.                                             *  at least 2 spaces, but viewing
  383.                                             *  data in col 1 is then ok)
  384.      4: pagedown jtrue 4                    * Get all redundant data in blk
  385.         deleteblock                         * Delete it to bof
  386.         begfile                             * Goto bof
  387.         CURSORDOWN                          * Pos on col desc line 2
  388.                                             * (Add/delete cursordown's for
  389.                                             *  more/less col desc lines)
  390.         CURSORDOWN                          * Move to data row 1
  391.      5: markline                            * Mark to test data redundancy
  392. * -------- Quit If Macro Was Not Invoked With Cursor In Data --------*
  393.         isemptyline jfalse 5A               * End if not started in data
  394.         quit                                * Quit Nul
  395.         prevwindow onewindow                * Data window 1, close windows
  396.         jump END                            * End macro
  397. * - Delete Position Marker And Remaining Redundant Data/Descriptions -*
  398.     5A: find return "L" return jtrue 6      * Test if on marker row
  399.         delline jump 5                      * Delete redundant all rows
  400.      6: delch                               * Delete pos marker we're on
  401.         prevwindow                          * Data window
  402.         markword gotoblockend cursorleft    * Pos on data last char
  403. * -------------------- Highlight Data In Window 2 --------------------*
  404.         nextwindow                          * Nul window
  405.         markword                            * Mark data in Nul
  406. * ---- Fill Empty Space Between Row Description and Data With "─" ----*
  407.         begline                             * To begin of title desc
  408.         markcolumn                          * Close block
  409.         findreplace                         * Replace
  410.             " " return                      *   all empty spaces
  411.             #196 return "LN" return         *   with "─", in block
  412.         gotoblockend cursorleft             * Pos on data last char
  413.         markword                            * Re-highlight data in window 2
  414.         prevwindow                          * Data window 1
  415.    END: defaultwordset makectrofscreen      * Re-set, to view more data lines
  416. *
  417. * 151 bytes Mon  05-04-1992  12:08:25 (TH ^cursorup, to ALL #3/841-845)
  418.  
  419. * 
  420. * ----------------------------------------------------------------------
  421. * ^(CursorDown) View Row and Column Descriptions of Data
  422. *               Scrolled Off Screen, Scroll Down From Cursor
  423. * ----------------------------------------------------------------------
  424. * See "How To Use Macros" above for use of this macro.
  425.  
  426. ^cursordown macrobegin
  427.         setscreenoff setinsmode altwordset setsoundoff
  428.         setwordwrapmode togglewordwrap
  429. * ---------------- End Macro If We're On Empty Lines ----------------*
  430.         cursorDOWN                          * Move down one line
  431.         isemptyline jtrue END               * Can't have empty data lines
  432. * ----------- Position Cursor On Data Left of Cursor Down -----------*
  433.         markword jfalse 0                   * Wordleft if cursor not on data
  434.         wordright wordleft                  * Pos on char 1 of cursor data
  435.      0: wordleft                            * Pos char 1 data left of cursor
  436. * ---- Position Cursor On Data Right of Data Left of Cursor Down ----*
  437.         isendline jtrue 1 wordright         * If at eol, wordleft
  438.         isendline jtrue 1 wordright         * If at eol, wordleft
  439.      1: wordleft                            * Pos char 1 data rt of cursor
  440.         #173                                * Insert pos marker
  441. * ------------------ Paste Data/Descriptions To Nul ------------------*
  442.         endpara unmarkblock markline        * Mark endpara
  443.         prevpara copy                       * Copy data/desc to scrap
  444.         find #173 return delline return     * Find pos marker
  445.         delch                               * Delete it, now posit'nd on data
  446.         onewindow horizontalwindow          * Open 2 windows
  447.         editfile "nul" return               * Load Nul window 2
  448.         endfile markline
  449.         begfile deleteblock                 * Make empty Nul
  450.         paste                               * Paste data/desc to Nul
  451. * -------------- Remove Redundant Data And Descriptions --------------*
  452.         isemptyline jfalse 3 delline        * For Qconfig set to insert
  453.                                             *  blocks above or below line
  454.                                             * (Can remove line if set above)
  455.      3: repeatfind wordleft                 * Move to prev data
  456.         cursorup markword                   * Mark word up one line
  457.         begfile markcolumn                  * Finish marking redund blk
  458.         fillblock " " return                * Delete redundant entries
  459.         gotocolumn "10" return              * Change "10" for diff row
  460.                                             *  desc col widths
  461.         cursorright                         * Move out of row desc's
  462.         unmarkblock markcolumn              * Start blk w/o row desc's
  463.         repeatfind                          * Move to pos marker
  464.         splitline endline                   * Move to end of prev data
  465.         prevposition joinline prevposition  * Include redundant data
  466.         cursorleft                          * Don't include extra spc in blk
  467.                                             * (If removed, data and col
  468.                                             *  desc's must be separated by
  469.                                             *  at least 2 spaces, but viewing
  470.                                             *  data in col 1 is then ok)
  471.      4: pagedown jtrue 4                    * Get all redundant data in blk
  472.         deleteblock                         * Delete it to bof
  473.         begfile                             * Goto bof
  474.         CURSORDOWN                          * Pos on col desc line 2
  475.                                             * (Add/delete cursordown's for
  476.                                             *  more/less col desc lines)
  477.         CURSORDOWN                          * Move to data row 1
  478.      5: markline                            * Mark to test data redundancy
  479. * -------- Quit If Macro Was Not Invoked With Cursor In Data --------*
  480.         isemptyline jfalse 5A               * End if not started in data
  481.         quit                                * Quit Nul
  482.         prevwindow onewindow                * Data window 1, close windows
  483.         jump END                            * End macro
  484. * - Delete Position Marker And Remaining Redundant Data/Descriptions -*
  485.     5A: find return "L" return jtrue 6      * Test if on marker row
  486.         delline jump 5                      * Delete redundant all rows
  487.      6: delch                               * Delete pos marker we're on
  488.         prevwindow                          * Data window
  489.         markword gotoblockend cursorleft    * Pos on data last char
  490. * -------------------- Highlight Data In Window 2 --------------------*
  491.         nextwindow                          * Nul window
  492.         markword                            * Mark data in Nul
  493. * ---- Fill Empty Space Between Row Description and Data With "─" ----*
  494.         begline                             * To begin of title desc
  495.         markcolumn                          * Close block
  496.         findreplace                         * Replace
  497.             " " return                      *   all empty spaces
  498.             #196 return "LN" return         *   with "─", in block
  499.         gotoblockend cursorleft             * Pos on data last char
  500.         markword                            * Re-highlight data in window 2
  501.         prevwindow                          * Data window 1
  502.    END: defaultwordset makectrofscreen      * Re-set, to view more data lines
  503. *
  504. * 151 bytes Mon  05-04-1992  12:08:34 (TH ^cursordown, to ALL #3/841-845)
  505.  
  506. * 
  507. * ----------------------------------------------------------------------
  508. * (f4) View Snapshot of Row and Column Descriptions of Data At Cursor,
  509. *     (No scroll)
  510. * ----------------------------------------------------------------------
  511. * This macro enables the row and column descriptions for data in a
  512. * table to be viewed in a window.  This can be useful for taking a
  513. * "snapshot" showing the actual row and column descriptions of data at
  514. * the curosr if the descriptions have scrolled from the screen while
  515. * editing "wide and deep" tables.
  516.  
  517. * Place the cursor on or before any data in the table above and press
  518. * f4.  At the pause, press <enter> to end macro and close viewing
  519. * window.  This macro must be modified for data tables with different
  520. * row and column descriptions as described in "Changing Macros" above.
  521.  
  522. f4      macrobegin
  523.         setscreenoff setinsmode altwordset setsoundoff
  524.         setwordwrapmode togglewordwrap
  525.         markword jtrue 2                    * Mark cur data
  526.         isendline jtrue 1                   * Test if past last data
  527.         wordright wordright                 * Pos for wordleft
  528.      1: wordleft                            * Pos on cur data
  529.      2: gotoblockbeg #173                   * Insert pos marker
  530.         endpara unmarkblock markline        * Mark endpara
  531.         prevpara copy                       * Copy data/desc to scrap
  532.         find #173 return delline return     * Find pos marker              *|
  533.         delch                               * Delete it, now posit'nd on data
  534.         onewindow horizontalwindow          * Open 2 windows
  535.         editfile "nul" return               * Load Nul
  536.         endfile markline                    * Insure Nul file is empty     *|
  537.         begfile deleteblock                 *  if already loaded           *|
  538.         paste                               * Paste data/desc to Nul
  539.         isemptyline jfalse 3 delline        * For Qconfig set to insert
  540.                                             *  blocks above or below line
  541.                                             * (Can remove line if set above)
  542.      3: repeatfind wordleft                 * Move to prev data            *|
  543.         cursorup markword                   * Mark word up one line        *|
  544.         begfile markcolumn                  * Finish marking redundant blk *|
  545.         fillblock " " return                * Delete redundant entries
  546.         gotocolumn "10" return              * Change "10" for diff row
  547.                                             *  desc col widths
  548.         cursorright                         * Move out of row desc's
  549.         unmarkblock markcolumn              * Start blk w/o row desc's
  550.         repeatfind                          * Move to pos marker
  551.         splitline endline                   * Move to end of prev data
  552.         prevposition joinline prevposition  * Include redundant data
  553.         cursorleft                          * Don't include extra spc in blk
  554.                                             * (If removed, data and col
  555.                                             *  desc's must be separated by
  556.                                             *  at least 2 spaces, but viewing
  557.                                             *  data in col 1 is then ok)
  558.      4: pagedown jtrue 4                    * Get all redundant data in blk
  559.         deleteblock                         * Delete it to bof
  560.         begfile                             * Goto bof
  561.         CURSORDOWN                          * Pos on col desc line 2
  562.                                             * (Add/delete cursordown's for
  563.                                             *  more/less col desc lines)
  564.         CURSORDOWN                          * Move to data row 1
  565.      5: markline                            * Mark to test data redundancy
  566. * -------- Quit If Macro Was Not Invoked With Cursor In Data --------*
  567.         isemptyline jtrue 6                 * End if not started in data   *|
  568.         find return "L" return jtrue 6      * Test if on marker row
  569.         delline jump 5                      * Delete redundant all rows
  570.      6: delch                               * Delete pos marker we're on   *|
  571.         markword                            * Highlight data in window     *|
  572.         prevwindow makectrofscreen          * To see data above/below line *|
  573.         setscreenon                         * Turn screen on
  574.         pause                               * Pause to view
  575.         setscreenoff                                                       *|
  576.         nextwindow
  577.    END: quit                                * Quit Nul                     *|
  578.         prevwindow onewindow                * Close windows
  579.                                             * (Can remove line if quit
  580.         defaultwordset                      *                closes windows)
  581. *
  582. * 116 bytes Wed  04-29-1992  15:42:43 (TH f4, to GG #20/623)
  583. * 119 bytes Mon  05-04-1992  12:09:25 (TH f4, changed *|, to ALL #3/841-845)
  584.  
  585. * 
  586. * --------------------------------------------------------------------
  587. * @(1) Right Justify Column Block (From AMACxx.ZIP rfr004.qm)
  588. * --------------------------------------------------------------------
  589. * This macro right justifies any column marked as a column block, open
  590. * or closed.  For example, marking the numbers as a column block:
  591. *                   This                  Becomes this
  592. *           ┌─────────────────┐         ┌─────────────────┐
  593. *           │123456789        │         │        123456789│
  594. *           │    123456789.1  │         │      123456789.1│
  595. *           │123456789.12     │         │     123456789.12│
  596. *           │    123456789.123│         │    123456789.123│
  597. *           │123456789        │         │        123456789│
  598. *           │    123456789.1  │         │      123456789.1│
  599. *           │123456789.12     │         │     123456789.12│
  600. *           │    123456789.123│         │    123456789.123│
  601. *           └─────────────────┘         └─────────────────┘
  602.  
  603. @1      macrobegin
  604.         setscreenoff
  605.         editfile "nul" return quit gotoblockbeg jfalse END
  606.         editfile return
  607.         copyblock gotoblockend cursorleft addline #173 cursorup
  608.   LOOP: unmarkblock markcolumn endline
  609.         cut begline paste endline jtrue EMPTY gotoblockend
  610.  EMPTY: cursorleft cursorup jtrue LOOP begfile cursorright
  611.         markcolumn endfile cursorup
  612.         copy quit pasteover
  613.    END: unmarkblock
  614. *
  615. * 52 bytes Tue  03-31-1992  09:47:19 (TH @1, to All #3/841-845)
  616.  
  617. * 
  618. * ----------------------------------------------------------------------
  619. * @(3) Close Viewing Window And Quit Nul File After Invoking Either
  620. *     ^CursorRight, ^CursorLeft, ^CursorDown,  or ^CursorUp
  621. * ----------------------------------------------------------------------
  622. * This macro is handy for quickly removing the viewing window and
  623. * quitting the Nul file when using CursorRight, ^CursorLeft,
  624. * ^CursorDown,  or ^CursorUp.
  625.  
  626. @3      macrobegin setscreenoff
  627.         onewindow horizontalwindow
  628.         editfile "Nul" return quit              * Insure Nul in window 2
  629.         prevwindow unmarkblock onewindow        * Need if Qconfig not set
  630. *                                               *  to close window on quit
  631. * 19 bytes Fri  05-01-1992  22:13:56 (TH @3, to All #3/841-845)
  632.  
  633. * 
  634. * ----------------------------------------------------------------------
  635. * @(h)  Jump To Selected Index Item In File From Index
  636. * ----------------------------------------------------------------------
  637. * Press @ and h at the same time.  Cursor down to desired line in
  638. * Index.  Press <enter> to jump to the selected item in file from the
  639. * Index.  See BOOKnn.QM in AMACnn.Zip for more discussion.
  640.  
  641. @h      macrobegin begfile unmarkblock markline markline
  642.         pause
  643.         wordright markword copy endpara
  644.         find "(" paste ")"  return return
  645.         begline
  646. *
  647. * 22 bytes Tue  04-09-1991  16:23:53
  648.  
  649. * 
  650. * ------------------------------------------------------
  651. * (f7)  Jump to Previous Position Marker in Current File
  652. * ------------------------------------------------------
  653. * f7 jumps to the previous position marker in the file currently being
  654. * edited.  See JMPPOSnn.QM for more.
  655.  
  656. f7  MacroBegin
  657.     setscreenoff                * Remove if not using QEdit v2.15          *|
  658.     BegLine ScrollUp BegScreen  * Move cursor in front of Marker in
  659.                                 *  case current screen is positioned
  660.                                 *  with marker right on top
  661.     Find                        * Search
  662.     #031 #030 Return "B" Return *  backwards for Marker
  663.  JTrue FOUND                    * Test if Found, go to FOUND
  664.     Prevposition                *ELSE if not found,
  665.     Find Return "GB" Return     * Do global search from bottom up
  666.                                 * Keeps starting cursor position
  667.                                 *  if no marker in file
  668.     Jfalse END                  * Test if not found, end macro
  669.  FOUND:                         *ELSE marker was found
  670.     MakeTopofScreen             * Position Label Line at Top of Screen
  671.  END: ScrollDown                * Remove it from View
  672. *
  673. * 32 bytes Sat  05-04-1991  01:36:19 (TH f7, to All #3/841-845)
  674. * 33 bytes Mon  05-04-1992  12:42:21 (TH f7, added setscreenoff)
  675.  
  676. * 
  677. * ------------------------------------------------------
  678. * (f8)  Jump to Next Position Marker in Current File
  679. * ------------------------------------------------------
  680. * f8 jumps to the next position marker in the file currently being
  681. * edited.  See JMPPOSnn.QM for more.
  682.  
  683. f8  MacroBegin
  684.     setscreenoff                     * Remove if not using QEdit v2.15     *|
  685.     Find                             * Search Down for Pos Marker Label
  686.     #031 #030  Return DelLine Return
  687.  JTrue FOUND                         * Test if Found
  688.     BegFile                          * If Not, Start at Top of File
  689.     RepeatFind                       * and Repeat the Search
  690.  JTrue FOUND                         * Test if Now Found
  691.     PrevPosition                     * No Label in File, Return to
  692.     MakeCtrofScreen                  * orig Position and Center
  693.  Jump END
  694.  FOUND:                              * Label Was Found
  695.     MakeTopofScreen                  * Position Label Line at Top of Screen
  696.     ScrollDown                       * Remove it from View
  697.  END:
  698. *
  699. * 27 bytes Thu  10-03-1991  12:36:54 (TH f8, to All #3/841-845)
  700. * 28 bytes Mon  05-04-1992  12:42:25 (TH f8, added setscreenoff)
  701.  
  702. * (Version) History
  703. * ------------------
  704. * 1.0     Initial.                                                     5/27/92
  705. *         In Amac43.zip.                                               5/27/92
  706. * 1.0a    Added ( ) to Index line 1 for bok001.qm macros.              5/30/92
  707. *
  708. *
  709. *
  710. *
  711. *-- (eof)
  712.  
  713.